var TG = document.querySelector(".TG"),
	TGMask = document.querySelector(".TG_Mask"),
	TJSPMask = document.querySelector(".TJSP_Mask"),
	btnTjsp = document.querySelector(".btn-TJSP"),
	btnTg = document.querySelector(".btn-TJSP"),	
	TGList = document.querySelector(".TG_list"),
	btnClose1 = document.querySelector(".btn-close1"),
	btnClose = document.querySelector(".btn-close"),
	body = document.querySelector("body"),
	spgl = document.querySelector(".shangpgl"),
	iconMine = document.querySelector(".icon-mine");

//禁止用户滑动
	
//	推广按钮点击跳出推广信息
TG.addEventListener("click",function(){
//	console.log("点击成功");
	TGMask.classList.toggle("test");
	body.setAttribute("style","overflow: hidden");
})

TGMask.addEventListener("click",function(e){
	e.preventDefault();
//	console.log("你点到我了")
//	TGMask.classList.toggle("test");
})
//点击取消按钮效果
btnClose1.addEventListener("click",function(){
//	console.log("关闭成功")
//	e.preventDefault();
	TGMask.classList.toggle("test");
	body.setAttribute("style","overflow: none");
},false)
btnClose.addEventListener("click",function(){
//	console.log("关闭成功")
	TJSPMask.classList.toggle("test");
	body.setAttribute("style","overflow: none");
})
//添加商品点击效果
btnTjsp.addEventListener("click",function(){
//	console.log("点击成功")
	TJSPMask.classList.toggle("test");
	body.setAttribute("style","overflow: hidden");
})
TJSPMask.addEventListener("click",function(e){
//	console.log("你点到我了")
	e.preventDefault();
//	TGMask.classList.toggle("test");
})


//遮罩层被点击
//TGMask.addEventListener("click",function(){
//	console.log("点击成功")
//	TGMask.classList.toggle("test");
//})
//TJSPMask.addEventListener("click",function(){
//	TJSPMask.classList.toggle("test");
//})

spgl.addEventListener("click",function(){
	location.href = "shopManagement/shopIndex.html"
})
iconMine.addEventListener("click",function(){
	location.href = "Minepron.html"
})